
package beans.order;

import beans.person.Company;

/**
 *
 * @author xmarti
 */
public class AccountingYear {
    private int year;
    private Company company;
    private String description;

    public AccountingYear(int year, Company company) {
        this.year = year;
        this.company = company;
    }
    public AccountingYear(int year, Company company, String description) {
        this.year = year;
        this.company = company;
        this.description = description;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final AccountingYear other = (AccountingYear) obj;
        if (this.year != other.year) {
            return false;
        }
        if (this.company != other.company && (this.company == null || !this.company.equals(other.company))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        return hash;
    }
    
    
}
